package com.cuit.qx.dao;

import com.cuit.qx.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
@Mapper
public interface UserMapper {

	User selectUserLogin(@Param("userName") String userName, @Param("password") String password);

	Long selectUserErrorCount(@Param("userName") String userName);

	Date selectUserLockDate(@Param("userName") String userName);

	void updateUserCountAndLockDate(@Param("userName") String userName, @Param("date") Date date);

	void updateUserErrorCount(@Param("userName") String userName, @Param("i") int i);

	Integer deleteUserById(@Param("id") String id);

	List<User> selectAllUser(@Param("page") int page,@Param("rows") int rows,@Param("linkName") String linkName, @Param("type") Integer type);

	int selectCountUser(@Param("linkName") String linkName, @Param("type") Integer type);

	Integer deleteUsersByIds(String[] ids);

	void insertUser(User user);

	Integer checkLoginName(@Param("loginname") String loginname);

	User selectUserInfoBeanById(@Param("id") String id);

	int updateUserInfoBean(User user);

	int updateUserStatus(@Param("userid") String userid, @Param("status") Integer status);

	int selectPasswordCon(@Param("userName") String userName, @Param("password") String password);

	int updatePassword(@Param("userName") String userName, @Param("password") String password);
	
	User selectUser(@Param("userName") String userName);

}